﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

// AutoCAD2018 hander
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;

namespace _00HelloCAD
{
    public class Class1
    {
        [CommandMethod("HelloWorld")]
        public void HelloWorld()
        {
            // [EN] create autoCAD console object
            // [CN] 创建CAD命令行对象
            Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
            // [EN] output text to autoCAD console
            // [CN] 输出文本到AutoCAD控制台
            editor.WriteMessage("Hello AutoCAD word");
        }
    }
}
